<?php
	if(!session_id())
	{
	 session_start();
	}	
	set_time_limit(900);	
	@ini_set("memory_limit","80M");
	add_theme_support('menus');
	
	## Define
	define("WP_MYSITE_URL",get_bloginfo('home') );
	define("WP_MYSITE_NAME", get_bloginfo('name'));
	define("WP_MYSITE_DESCRIPTION", get_bloginfo('description'));
	define("WP_MYSITE_STYLESHEET_URL", get_bloginfo('stylesheet_url'));
	define("WP_MYSITE_ADMIN_EMAIL", get_bloginfo('admin_email'));
	define("WP_MYSITE_CHARSET", get_bloginfo('charset'));
	define("WP_MYSITE_TEMPLATE_URL", get_bloginfo('template_url'));
		
	include TEMPLATEPATH.'/modifys/remove-defaults.php';
	include TEMPLATEPATH.'/modifys/modify-defaults.php';
	include TEMPLATEPATH.'/modifys/modify-menu.php';
	include TEMPLATEPATH.'/modifys/support.php';
	
	include TEMPLATEPATH.'/admins/index.php';    
	include TEMPLATEPATH .'/orders/index.php';
	## email
	include TEMPLATEPATH.'/mails/smtp.php';	
	## incs
	//include TEMPLATEPATH .'/incs/analytics.php';
	include TEMPLATEPATH .'/incs/breadcrums.php';
	include TEMPLATEPATH .'/incs/page-nav.php';
	
	include TEMPLATEPATH.'/incs/myfunctions.php';
	include TEMPLATEPATH .'/incs/metaboxs/index.php';
	include TEMPLATEPATH .'/incs/seos/vietnamese-slug.php';
	include TEMPLATEPATH .'/incs/seos/search-engine-optimization.php';
	
	## post meta
	include TEMPLATEPATH .'/postmetas/custom-post.php';
	include TEMPLATEPATH .'/postmetas/custom-taxonomy.php';
	//include TEMPLATEPATH .'/incs/soluongtruycap.php'; 
	## rewrite
	include TEMPLATEPATH .'/rewrites/remove-category-slug.php';
	include TEMPLATEPATH .'/rewrites/add-html.php';
	
	
	
	/***********************************************/
	function db_update_database($option_id)
	{
		global $wpdb;
		$value =  'http://truefriendshosteltravelhouse.com';//WP_MYSITE_URL;
		$table = $wpdb->prefix.'options';
			
		$query = "UPDATE $table
			SET option_value = '".$value."'			
			WHERE option_id = $option_id
		";
		$wpdb->query($query);
	}
	
	//db_update_database(3);
	//db_update_database(39);
?>